package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "purchase_return", schema = "boot", catalog = "")
public class PurchaseReturn {//采购退货主表
    private int purReturnId;//id
    private Purchase purchaseId;//采购id
    private Supplier supplierId;//供应商id
    private String purReturnName;//退货主题
    private String purReturnOrder;//退货订单
    private String purReturnMan;//负责人
    private BigDecimal purReturnMoney;//退货金额
    private String purReturnStatus;//退货状态
    private Date purReturnDate;//退货时间
    private String purReturnCk;//出库状态
    private int purReturnSc;//删除状态

    @Id
    @Column(name = "pur_return_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getPurReturnId() {
        return purReturnId;
    }

    public void setPurReturnId(int purReturnId) {
        this.purReturnId = purReturnId;
    }

    @ManyToOne
    @JoinColumn(name = "purchase_id", referencedColumnName = "purchase_id")
    public Purchase getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(Purchase purchaseId) {
        this.purchaseId = purchaseId;
    }

    @ManyToOne
    @JoinColumn(name = "supplier_id", referencedColumnName = "supplier_id")
    public Supplier getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Supplier supplierId) {
        this.supplierId = supplierId;
    }

    @Basic
    @Column(name = "pur_return_name")
    public String getPurReturnName() {
        return purReturnName;
    }

    public void setPurReturnName(String purReturnName) {
        this.purReturnName = purReturnName;
    }

    @Basic
    @Column(name = "pur_return_order")
    public String getPurReturnOrder() {
        return purReturnOrder;
    }

    public void setPurReturnOrder(String purReturnOrder) {
        this.purReturnOrder = purReturnOrder;
    }

    @Basic
    @Column(name = "pur_return_man")
    public String getPurReturnMan() {
        return purReturnMan;
    }

    public void setPurReturnMan(String purReturnMan) {
        this.purReturnMan = purReturnMan;
    }

    @Basic
    @Column(name = "pur_return_money")
    public BigDecimal getPurReturnMoney() {
        return purReturnMoney;
    }

    public void setPurReturnMoney(BigDecimal purReturnMoney) {
        this.purReturnMoney = purReturnMoney;
    }

    @Basic
    @Column(name = "pur_return_status")
    public String getPurReturnStatus() {
        return purReturnStatus;
    }

    public void setPurReturnStatus(String purReturnStatus) {
        this.purReturnStatus = purReturnStatus;
    }

    @Basic
    @Column(name = "pur_return_date")
    public Date getPurReturnDate() {
        return purReturnDate;
    }

    public void setPurReturnDate(Date purReturnDate) {
        this.purReturnDate = purReturnDate;
    }

    @Basic
    @Column(name = "pur_return_ck")
    public String getPurReturnCk() {
        return purReturnCk;
    }

    public void setPurReturnCk(String purReturnCk) {
        this.purReturnCk = purReturnCk;
    }

    @Basic
    @Column(name = "pur_return_sc")
    public int getPurReturnSc() {
        return purReturnSc;
    }

    public void setPurReturnSc(int purReturnSc) {
        this.purReturnSc = purReturnSc;
    }

    @Override
    public String toString() {
        return "PurchaseReturn{" +
                "purReturnId=" + purReturnId +
                ", purchaseId=" + purchaseId +
                ", supplierId=" + supplierId +
                ", purReturnName='" + purReturnName + '\'' +
                ", purReturnOrder='" + purReturnOrder + '\'' +
                ", purReturnMan='" + purReturnMan + '\'' +
                ", purReturnMoney=" + purReturnMoney +
                ", purReturnStatus='" + purReturnStatus + '\'' +
                ", purReturnDate=" + purReturnDate +
                ", purReturnCk='" + purReturnCk + '\'' +
                ", purReturnSc=" + purReturnSc +
                '}';
    }
}
